<?php

namespace app\admin\controller;

use think\Db;

class Shopcart extends Base
{
	protected $datas;

	protected $table = 't_shopcart';

	/**
	 * 购物车列表
	 * @Author   Yichen
	 * @DateTime 2020-05-04T14:40:30+0800
	 * @return   [type]                   [description]
	 */
	public function cartList()
	{
		$list = Db::name($this->table)->alias('s')
			->join('t_goods_property gp', 's.goods_property_id=gp.id', 'left')
			->join('t_user u', 's.user_id=u.id', 'left')
			->field('u.username,gp.specifications_name,s.number,s.create_time')
			->paginate(6);
		$this->assign('list', $list);
		return $this->fetch();
	}	
}